<template>
<h1>日期时间选择器组件</h1>
  <hr>
  <el-date-picker type="date" v-model="rq" value-format="YYYY-MM-DD"  @change="console.log(rq)">

  </el-date-picker>
  <br>
  <el-date-picker
      type="daterange"
      format="YYYY-MM-DD HH:mm:ss"
      value-format="YYYY-MM-DD HH:mm:ss"
      v-model="time"
      @change="f"
      start-placeholder="开始"
      end-placeholder="结束"
      range-separator="到">

  </el-date-picker>
</template>
<script setup>
import {ref} from "vue";

const rq=ref('');
const time=ref([]);
const f=()=>{
  console.log(time.value);
}

</script>


<style scoped>

</style>